
#ifndef _NNET_H
#  define _NNET_H

/* This file holds definitions for the library that are useful to the using */
/* application. Other library visible stuff is defined else where. */

#  include <nnet_list.h>
#  include <nnet_types.h>

/* Data types. */

typedef struct nnet_node {

  /* Not dependent on node type. */
  nnet_size_t nid;
  nnlist inputs;
  double thresh;
  double output_strength;

  /* This is node dependent and for internal use only. */
  double input;   // Current input for the tick.
  double output;  // Current output for the tick.
  nnet_node_type type;
  void fire_func(struct nnet *); // Function to fire the node if necessary
  void pre_tick(struct nnet *, nnet_tick);  // Implement gate & dump nodes

} nnet_node;

#  define NNET_NODE_GATE    0x01
#  define NNET_NODE_INTER   0x04
#  define NNET_NODE_DUMP    0x10
#  define NNET_NODE_NOT     0x40

typedef struct nnet {

  nnlist gate_nodes;
  nnlist inter_nodes;
  nnlist dump_nodes; 

  nnet_tick tick;

} nnet;

#endif
